1. Field of Invention
The present invention relates to a method and apparatus of selectively exchanging control and state information between network devices. The control and state information is exchanged via a frame that is scalable to support many different applications. More specifically, a technique building upon the use of virtual channels for achieving the control of certain data flows through the network device, without blocking the flow of other data through the same link, effectively increasing the bandwidth utilization of the link and the throughput of the network device.
2. Description of Related Art
Many types of network devices are necessary to allow a network to function properly. One such network device is commonly referred to as a switch. A switch is defined as a network component that receives incoming data, stores the data temporarily, and sends the data back out on another port. The switching is accomplished by determining a destination address from the incoming data and sending the data to a port or set of ports associated with the destination address. The control and monitoring of a switch is essential in handling the flow of data in high speed networks. One such function is the control of the selective flow of data through the switch in response to congestion, either internal or external to the switch.
Ethernet switches generally support two common mechanisms to handle resource congestion inside the switch. This Ingress backpressure mechanism enables the switch to flow control the traffic sent by a remote link partner, i.e. another end station or another switch. This process is illustrated in FIG. 1. The Ethernet Switch 100 keeps track of the number of packets or cells received on each Ingress Port, such as Port #1 connected to remote link partner 110. If the number of bytes or cells received on an Ingress Port exceed the configurable Ingress Back Pressure threshold, then the switch exerts Back Pressure. In another technique, if the number of packets received on an Egress Port, such as Egress Port #8 connected to the local or wide area networks 120, exceeds a pre-configured threshold value, then egress generates an Ingress Back Pressure request to the Ingress port.
In Full Duplex mode, this Back Pressure is achieved by sending a MAC control frame called a Pause Frame. Upon receiving the Pause Frame, the remote link partner stops sending further packets until the timer specified in the Pause Frame expires or the switch explicitly sends Resume Frame (Pause Frame with Timer=0). Thus, the entire link remains idle until communication resumes. This flow control mechanism on a full duplex port is specified in the IEEE std 802.3x, in which it has been specified that an ingress port in a full duplex mode should send Pause Frames for flow control.
In Half Duplex mode, this Back Pressure mechanism can be achieved by enabling a Jamming signal and thereby preventing any other station from sending the packet. For ports that are in half duplex mode, this prevents any other station from sending packets to the port. The enabling of jamming signal in half duplex is not a standard, but is done by many of the switch vendors.
These techniques help in avoiding losing any packet that was being received and forwarded by the ingress port and it is generally termed as a Zero-Loss mode of switching, or as a Zero Packet Loss mode of switching. This process has other side effects, however, including an adverse impact on the switch's throughput and wire speed switch rate.
In addition, Ethernet switches also support a mechanism to handle Head Of Line (HOL) blocking avoidance. This mechanism is illustrated in FIG. 2. The switch 200 keeps track of number of bytes or cells that are sitting on an Egress Port, such as Egress Port #8 connected to the local or wide area networks, or any type of networks 220. If the number of bytes or cells or packets exceed the Head Of Line (HOL) threshold value then all packets going to that Egress port are dropped at the Ingress port itself. The HOL values are generally configured by software depending on the size of the packet memory. This is generally termed as a HOL avoidance mode of switching. In this HOL avoidance mode, switch performance is sustained by sacrificing packets.
in a Zero-Loss mechanism, the switch never drops any packet for any traffic scenario, the worst case being all ingress ports are sending packets to one egress port. In this Zero-Loss mode, the switch will hit the Ingress Back Pressure threshold before hitting the Egress HOL limit, so that it exerts Ingress Back Pressure rather than dropping packet going to the congested port. As such, there are disadvantages to both types of mechanisms used for controlling the flow of data through a switch.
In terms of providing actual control of the flow of data through a network device, the above processes are often crude with respect to the aspects they allow to be controlled. The present implementations can achieve zero-packet loss but the throughput of the network is often decreased. Alternatively, implementations delaying with Head Of Line blocking can sustain throughput, but the loss of packets increases. Thus, there is a need for a mechanism in a network device that achieves Zero-Loss processing of data that does not have the detrimental effects on the performance of the network device found in the prior art processes. Additionally, there is also a need for selective flow control mechanism that can also be utilized to allow the flow of data having a certain priority to be unimpeded.